/*
 * @Description: 路由配置
 */

import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/homepage/Home'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import Login from '@/components/homepage/Login'
import index from '@/components/homepage/Index'
import Detail from '@/components/homepage/Detail'
import Total from '@/components/total//Total'
import Info from '@/components/total/Info'
import Subject from '@/components/total/Info/Subject'
import Vis from '@/components/vis/Vis'
import Check from '@/components/vis/comp/Check'
import Email from '@/components/vis/comp/Email'
import visHome from '@/components/vis/comp/visHome'
import Log from '@/components/vis/comp/Log'
import Other from '@/components/vis/comp/Other'
import Person from '@/components/vis/comp/Person'

Vue.use(ElementUI)
Vue.use(Router)

export default new Router({
  routes: [
    {
      // path: '/vis/visHome',
      path: '/',
      // mode:'history',
      // base:'/checkClass/',
      redirect: '/index/home',
      // redirect: '/vis/visHome'
    },
    {
      path: '*',
      redirect: '/index/home'
    },
    {
      path: '/vis',
      component: Vis,
      children: [
        {
          path: 'check',
          name: '打卡检测',
          component: Check
        },
        {
          path: 'email',
          name: '邮件检测',
          component: Email
        },
        {
          path: 'other',
          name: '登录监测',
          component: Other
        },
        {
          path: 'visHome',
          name: '监测首页',
          component: visHome
        },
        {
          path: 'log',
          name: '流量监测',
          component: Log
        },
        {
          path: 'person/:id',
          // path: 'person',
          name: '个人信息',
          component: Person
        },
      ]
    },
    {
      path: '/index',
      component: index,
      children: [
        {
          path: 'login',
          component: Login
        },
        {
          path: 'home',
          component: Home
        },
        {
          path: 'detail',
          component: Detail
        }
      ]
    }
  ]
})
